package ws;

import org.json.JSONObject;

import android.os.AsyncTask;

import com.cachopoid.utils.Constantes;

public class threadCargaRankingCachopos extends AsyncTask <Void, Integer, Boolean> {
	Constantes cons = new Constantes();
    
	JSONObject jsonResult = new JSONObject();
	String urlRankingCachopos = cons.HOST_SERVICIOWEB+cons.SW_OBTENER_CACHOPOS_ORDERBY_BEST;

	
	@Override
	protected Boolean doInBackground(Void... params) {
		
	      try{
	    	  JSONManager jManager = new JSONManager();
	    	 jsonResult = jManager.getJSONfromURL(urlRankingCachopos,null);
	     }catch(Exception e){
	    	 
	     }
	      
	     return true;
	}
	
	@Override
	protected void onProgressUpdate(Integer... values) {
		// int progreso = values[0].intValue();
		// pbarProgreso.setProgress(progreso);
	}
	
	@Override
	protected void onPreExecute() {
		//pbarProgreso.setMax(100);
		//pbarProgreso.setProgress(0);
	}
	
	@Override
	protected void onPostExecute(Boolean result) {
		if(result){
		//	Toast.makeText(MainActivity, "Carga finalizada!", Toast.LENGTH_SHORT).show();
		}
	}
	
	@Override
	protected void onCancelled() {
		//Toast.makeText(MainActivity.this, "Carga cancelada!", Toast.LENGTH_SHORT).show();
	}

}
